package simpleTaskDispatcher.model;

public class WTFThread extends Thread {

		private boolean alive;
	
		public void run() {
			
			while(alive) {
				try {
					Thread.sleep(30000);
				} catch (InterruptedException e) {
				}
				System.out.println(" ----------------------------------------------------------- ");
				System.out.println("Nbpools : " +  WorkersPool.getAllRunningWorkerPools().size());
				for(WorkersPool pool : WorkersPool.getAllRunningWorkerPools()) {
					System.out.println(pool.toString());
				}
				System.out.println(" ----------------------------------------------------------- ");
				System.out.println("Nbworkers : " +  Worker.getAllRunningWorkers().size());
				for(Worker worker : Worker.getAllRunningWorkers()) {
					System.out.println(worker.getName());
				}

			}
			
		}

		public void stopThread() {
			alive = false;
		}
		
}

